#include "SFMLGame.hpp"
#include "SFMLInput.hpp"
#include "SFMLRender.hpp"

namespace openfe
{

  SFMLGame::SFMLGame()
    :Game(), 
     app(new sf::RenderWindow (sf::VideoMode(800, 480, 32),
			       "SFML Window", sf::Style::Close)),
     in (NULL), re(NULL)
  {
    in = new SFMLInput(this);
    re = new SFMLRender(this);
  }

  SFMLGame::~SFMLGame()
  {
    delete app; 
    delete re;
    delete in;
  }

  void SFMLGame::update()
  {
    if (in->quit())
      app->Close();
  }
}
